#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/9/15 17:57
# @Author: 刘航
# @Email: xxx@gmail.com
# @File：customer_page.py
"""
客户界面
"""
from selenium.webdriver.common.by import By
from pages.cus_mag_pages.base_page import BasePage

class CustomerPage(BasePage):

    add_cust_btn_locator = (By.XPATH,"/html/body/div[5]/div[2]/div[1]/div/a")
    add_cust_status_locator = (By.CSS_SELECTOR,".alert")

    def add_cust_btn(self):
        """客户页面新建客户按钮"""
        self.driver.find_element(*self.add_cust_btn_locator).click()
    def add_cust_status(self):
        """添加客户提示"""
        data = self.driver.find_element(*self.add_cust_status_locator).text
        return data